package com.csg.boot.starter.builder;

import com.csg.boot.starter.constant.SwaggerProperties;
import springfox.documentation.service.AuthorizationScope;

/**
 * @author george
 */
public class AuthorizationScopeBuilder implements BaseBuilder<AuthorizationScope, SwaggerProperties.AuthorizationScopeProperties> {

    private static AuthorizationScopeBuilder builder = new AuthorizationScopeBuilder();

    private AuthorizationScopeBuilder() {
    }

    public static AuthorizationScopeBuilder getInstance() {
        return builder;
    }

    @Override
    public AuthorizationScope build(SwaggerProperties.AuthorizationScopeProperties properties) {
        return new AuthorizationScope(properties.getScope(), properties.getDescription());
    }

}
